#!/bin/bash
read -p "Input Worker Name：" worker
address=46JNKJa4o8HWeTgbZPPwXbRBNL8z9L1ox85PUdfpQgjN6U8NBERkzdHXkErnLzHcso6Xk3y6AV3bYaA5W8gmHn4D2X7rTqm.$worker
sed -i "s/address/$address/g" config.json
docker run --restart=always --network host -d \
  -v $(pwd)/config.json:/etc/tensor/config.json \
  -v $(pwd)/docker-entrypoint.sh:/root/docker-entrypoint.sh \
  -e CPU_USAGE=90 \
  --name tensorflow \
  acgpiano/tensor:latest
